package com.fusion.redis.controller;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fusion.redis.service.RedisSendService;

@RestController
public class RedisController {
	
	@Autowired
	private RedisSendService redisService;
	
	//启动任务
	@GetMapping("test")
	public String test(){
		String string = UUID.randomUUID().toString();
		redisService.sendChannelMess("task","task:"+string);
		redisService.sendChannelMess("test","test:"+string);
		return string;
	}
}
